<script setup lang="ts">
import {ref, watch} from "vue";
import {devNumberConverterProps} from "./numberConverter";
import {devNumberToChinese} from "@/utils";

const props = defineProps(devNumberConverterProps);

const valueText = ref('');
watch(() => props, (value) => {
  valueText.value = devNumberToChinese(value.number, {textType: props.textType, semanticType: props.semanticType});
}, {immediate: true, deep: true})


defineOptions({
  name: 'DevNumberConverter'
});


</script>

<template>
  {{ valueText }}
</template>

<style scoped lang="scss">

</style>
